package com.lizi.apidoc.model;

import java.util.List;
import java.util.Map;

/**
 * 方法信息
 * @author 张健文【zhangjw@3vjia.com】
 * @since 2020/4/1 14:23
 * @modified by:
 */
public class ClassMethodDoc {

    /**
     * 方法名称
     */
    private String name;

    /**
     * 排序号
     */
    private int order;


    /**
     * 描述
     */
    private String desc;

    /**
     * 方法介绍
     */
    private String detail;

    /**
     * server url
     */
    private String serverUrl;

    /**
     * controller method url contains server
     */
    private String url;

    /**
     * controller path
     */
    private String path;

    /**
     * http request type
     */
    private String type;

    /**
     * http request author
     */
    private String author;

    /**
     * only used for generate markdown and adoc
     * http readers
     */
    private String headers;


    /**
     * http contentType
     */
    private String contentType = "application/json";

    /**
     * method deprecated
     */
    private boolean deprecated;

    /**
     * method param tag description
     */
    private Map<String, String> paramTagMap;

    /**
     * http request headers
     */
    private List<ApiReqHeader> requestHeaders;


    private List<ApiObjectProperty> requestBody;

    private ApiObjectProperty responseBody;

    public String getName() {
        return name;
    }

    public ClassMethodDoc setName(String name) {
        this.name = name;
        return this;
    }

    public int getOrder() {
        return order;
    }

    public ClassMethodDoc setOrder(int order) {
        this.order = order;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public ClassMethodDoc setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public String getDetail() {
        return detail;
    }

    public ClassMethodDoc setDetail(String detail) {
        this.detail = detail;
        return this;
    }

    public String getServerUrl() {
        return serverUrl;
    }

    public ClassMethodDoc setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public ClassMethodDoc setUrl(String url) {
        this.url = url;
        return this;
    }

    public String getPath() {
        return path;
    }

    public ClassMethodDoc setPath(String path) {
        this.path = path;
        return this;
    }

    public String getType() {
        return type;
    }

    public ClassMethodDoc setType(String type) {
        this.type = type;
        return this;
    }

    public String getAuthor() {
        return author;
    }

    public ClassMethodDoc setAuthor(String author) {
        this.author = author;
        return this;
    }

    public String getHeaders() {
        return headers;
    }

    public ClassMethodDoc setHeaders(String headers) {
        this.headers = headers;
        return this;
    }

    public String getContentType() {
        return contentType;
    }

    public ClassMethodDoc setContentType(String contentType) {
        this.contentType = contentType;
        return this;
    }

    public boolean isDeprecated() {
        return deprecated;
    }

    public ClassMethodDoc setDeprecated(boolean deprecated) {
        this.deprecated = deprecated;
        return this;
    }

    public Map<String, String> getParamTagMap() {
        return paramTagMap;
    }

    public ClassMethodDoc setParamTagMap(Map<String, String> paramTagMap) {
        this.paramTagMap = paramTagMap;
        return this;
    }

    public List<ApiReqHeader> getRequestHeaders() {
        return requestHeaders;
    }

    public ClassMethodDoc setRequestHeaders(List<ApiReqHeader> requestHeaders) {
        this.requestHeaders = requestHeaders;
        return this;
    }

    public List<ApiObjectProperty> getRequestBody() {
        return requestBody;
    }

    public ClassMethodDoc setRequestBody(List<ApiObjectProperty> requestBody) {
        this.requestBody = requestBody;
        return this;
    }

    public ApiObjectProperty getResponseBody() {
        return responseBody;
    }

    public ClassMethodDoc setResponseBody(ApiObjectProperty responseBody) {
        this.responseBody = responseBody;
        return this;
    }
}
